/*
 * OptimalMismatch.h
 *
 *  Created on: 02-09-2013
 *      Author: Krzychu
 */

#ifndef OPTIMALMISMATCH_H_
#define OPTIMALMISMATCH_H_

#include "QuickSearch.h"
#include "../Structures/PatternStructure.h"

class OptimalMismatch: public QuickSearch
{
public:
	OptimalMismatch();
	virtual ~OptimalMismatch();
	virtual searchResult execute(std::string text, std::string pattern);
	virtual std::string getName();
protected:
	int matchShift(std::string pattern, int ploc, int lshift, patStruct *pat);
	int* preAdaptedGs(std::string pattern, patStruct *pat);
private:
	void orderPattern(std::string pattern, patStruct *pat);
};

#endif /* OPTIMALMISMATCH_H_ */
